from typing import Optional, List

class AIAssistant:
    def __init__(self):
        # ID
        self.id: Optional[int] = None
        # 名称
        self.name: Optional[str] = None
        # 类型
        self.type: Optional[str] = None
        # 版本
        self.ver: Optional[str] = None
        # 状态 0: 离线, 1: 在线
        self.state: int = 0
        # 能力评分
        self.score: float = 0.0
        self.task: Optional[str] = None
        self.image: Optional[str] = None
        self.value: Optional[str] = None

        self.darry = ["DeepSeek", "腾讯元宝", "通义千问", "数小析"]
        self.iarry = ["图灵", "文心一言"]
        self.garry = ["Kimi", "文小助"]
        self.sarry = ["翻译精灵"]
        self.varry = ["小爱同学", "小薇", "小智"]
        self.aarry = ["数据分析助手", "图片生成助手", "文本生成助手", "翻译助手", "语音助手"]

    def getId(self):
        return self.id

    def setId(self, id_value: int):
        self.id = id_value

    def getName(self):
        return self.name

    def setName(self, name: str):
        self.name = name

    def getType(self):
        return self.type

    def setType(self, type_value: str):
        self.type = type_value

    def getVer(self):
        return self.ver

    def setVer(self, ver: str):
        self.ver = ver

    def getState(self):
        return self.state

    def setState(self, state: int):
        self.state = state

    def getScore(self):
        return self.score

    def setScore(self, score: float):
        self.score = score

    def getTask(self):
        return self.task

    def setTask(self, task: str):
        self.task = task

    def setImage(self, image: str):
        self.image = image

    def setValue(self, value: str):
        self.value = value

    def tasking(self):
        image_str = self.image or ""
        name_str = self.name or ""
        type_str = self.type or ""
        value_str = self.value or ""
        task_str = self.task or ""
        print(f"{image_str}{name_str}（{type_str}）正在处理{value_str}任务：{task_str}")

    def containsChineseIgnoreCase(self, target: Optional[str], array: Optional[List[str]]) -> bool:
        if target is None or array is None:
            return False
        target_lower = target.lower()
        for element in array:
            if target_lower == str(element).lower():
                return True
        return False


